<?xml version='1.0' encoding='UTF-8' ?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core" 
      xmlns:h="http://java.sun.com/jsf/html" 
      xmlns:p="http://primefaces.prime.com.tr/ui"> 
    <h:head> 
        <title>View All Events</title> 
 
        <style type="text/css"> 
 
            .gritter-notice-wrapper { 
                left:200px; 
                top: 50px; 
            } 
 
        </style> 
 
    </h:head> 
    <h:body>                 
         
        <h:form id="formMain"> 
             
            <h1>MyPrimeFacesOrganizer - Powered by PrimeFaces 2.2.1</h1> 
             
            <p:menubar autoSubmenuDisplay="true">                 
                <p:menuitem value="Home" url="index.xhtml" /> 
                <p:menuitem value="View All Events" url="viewAllEvents.xhtml" /> 
                <p:menuitem value="Add New Event" url="addNewEvent.xhtml" /> 
            </p:menubar> 
             
            <br/> 
             
            <p:panel header="View All Events"> 
                 
                <p:dataTable var="event" value="#{eventDataTableBean.events}" dynamic="true" paginator="true" rows="5" emptyMessage="No event"> 
                    <p:column sortBy="#{event.eventId}"> 
                        <f:facet name="header"> 
                            <h:outputText value="Event ID" /> 
                        </f:facet> 
                        <h:outputText value="#{event.eventId}" /> 
                    </p:column> 
 
                    <p:column sortBy="#{event.eventName}"> 
                        <f:facet name="header"> 
                            <h:outputText value="Event Name" /> 
                        </f:facet> 
                        <h:outputText value="#{event.eventName}" /> 
                    </p:column> 
 
                    <p:column> 
                        <f:facet name="header"> 
                            <h:outputText value="Start Date/Time" /> 
                        </f:facet> 
                        <h:outputText value="#{event.startDateTime}" /> 
                    </p:column> 
 
                    <p:column> 
                        <f:facet name="header"> 
                            <h:outputText value="End Date/Time" /> 
                        </f:facet> 
                        <h:outputText value="#{event.endDateTime}" />
                        </p:column> 
 
                    <p:column sortBy="#{event.venue.venueName}"> 
                        <f:facet name="header"> 
                            <h:outputText value="Venue Name" /> 
                        </f:facet> 
                        <h:outputText value="#{event.venue.venueName}" /> 
                    </p:column> 
 
                    <p:column sortBy="#{event.systemUser.userName}"> 
                        <f:facet name="header"> 
                            <h:outputText value="System User" /> 
                        </f:facet> 
                        <h:outputText value="#{event.systemUser.userName}" /> 
                    </p:column> 
 
                    <p:column> 
                        <f:facet name="header"> 
                            <h:outputText value="Status" /> 
                        </f:facet> 
                        <h:outputText value="#{event.status}" /> 
                    </p:column> 
 
                </p:dataTable> 
                 
            </p:panel> 
             
        </h:form> 
                 
    </h:body> 
</html>